The increasing use of virtual machines for purposes—ranging from support of older operating system environments to power savings to virtual lab managers—has created new challenges in the field of information technology. One of the fields where virtualization is strongly used is during the test phase of a new software application thanks to the possibility of quickly instantiating a new virtual system and to the possibility of taking and reverting to previous snapshots.
Snapshots allow saving a particular state of a virtual machine so that at any later time a developer can revert to that earlier state. In order to restore the state of a virtual machine to one of its previous states, hypervisors allow restoring a given snapshot. In doing so, the entire state of the virtual machine (both memory and disks) is restored.
There are several disclosures related to a management of a virtual machine. Document US2008/0034364A1 discloses techniques for publishing, subscribing to, or playing live appliances. A live appliance includes a current virtual machine image. In publishing, a proxy file of a live appliance file type is provided to the publisher. The type is mapped to a live appliance player so that when a proxy file is opened, the current virtual machine image is run. The player automatically binds a writeable file system external to the virtual machine image to the image to provide file storage that is accessible from within the virtual machine image and from a host operating system. The player also creates a subscription to the live appliance on the host computer in case there is not any when the proxy file is run. With the subscription, the player runs the then-current virtual machine image whenever the live appliance is run.
Document US2009/0204961A1 discloses an embodiment relating generally to a method of distributing virtual machines. The method includes specifying a set of requirements for a virtual machine and instantiating a virtual machine based on a lightweight reusable profile, based on the set of requirements as described in the profile. The method also includes importing the profile to a distribution server; and distributing the profile to at least one physical machine in response to a request. Software can be added to the at least one physical machine that can manage the deployment of the physical hosts as a farm to hosting the virtual images.
These documents describe how to apply configuration settings for an initial setup of a virtual machine. When restoring the state of a virtual machine corresponding to a powered-on virtual machine it is not possible to apply any reconfigurations to the snapshot taken earlier since the virtual machine is already running and there is no way of hooking a reconfiguration script.
In general, known cloud environments and virtual lab manager environments provide ways of reconfiguring virtual machines at their first boot through a set of initialization scripts that can be “hooked” into the image. However, such solutions cover the case in which a new virtual machine gets instantiated from an image, but not the case when the state of a virtual machine is reverted from a snapshot.
Therefore, there may be a need for reconfiguring snapshots taken from a virtual machine for better adaptability of e.g., test environments and higher flexibility and productivity of software developers.